<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return redirect("/admin");
});
Route::get('/test', function () {
	print_r($_SERVER["HTTP_HOST"]);exit;
    return view('admin.calendar');
});
//Route::any('/test', 'HomeController@test')->name('test');
Route::post('/main/sellGoods', 'MainController@sellGoods')->name('sellGoods');
Route::post('/main/sellGoodsInside', 'MainController@sellGoodsInside')->name('sellGoodsInside');
Route::post('/main/updateStatic', 'MainController@updateStatic')->name('updateStatic');//更新统计
Route::get('/main/getGoodsPrice', 'MainController@getGoodsPrice')->name('getGoodsPrice');
Route::get('/main/getMinPrice', 'MainController@getMinPrice');
Route::get('/main/getAccountMoney', 'MainController@getAccountMoney')->name('getAccountMoney');
Route::post('/main/isFirstBuy', 'MainController@isFirstBuy')->name('isFirstBuy'); // 是否第一次购买
Route::get('/main/getStorePrice', 'MainController@getStorePrice');
Route::get('/main/shareBonus', 'MainController@shareBonus');
Route::get('/main/getMonthProfit', 'MainController@getMonthProfit')->name('getMonthProfit');
Route::get('/main/copyStore', 'MainController@copyStore')->name('copyStore'); //复制店铺
Route::get('/main/getActivityList', 'MainController@getActivityList')->name('getActivityList'); // 获取活动列表
Route::get('/main/getUserTags', 'MainController@getUserTags')->name('getUserTags'); // 获取标签列表
Route::post('/main/channelGoodsOut', 'MainController@channelGoodsOut')->name('channelGoodsOut'); // 取消出库
Route::post('/main/checkWithdraw', 'MainController@checkWithdraw')->name('checkWithdraw'); // 提现通过
Route::post('/main/aggreeConsume', 'MainController@aggreeConsume')->name('aggreeConsume'); // 内销通过
Route::get('/main/getSharePoster', 'MainController@getSharePoster')->name('getSharePoster'); // 获取活动分享图片

Route::post('/agency/shopSellGoods', 'MobileShopController@shopSellGoods')->name('shopSellGoods'); // 售出商品
Route::post('/agency/getGoodsNum', 'MobileShopController@getGoodsNum')->name('getGoodsNum'); // 获取商品库存
Route::post('/agency/channelOrder', 'MobileShopController@channelOrder')->name('channelOrder'); // 取消出库

Route::any('/eCard', 'HomeController@eCard');

Route::any('/apiAdminLogin', 'HomeController@apiAdminLogin');//店员登陆
Route::any('/apiAdminResetPassword', 'HomeController@apiAdminResetPassword');//店员修改密码

Route::any('/apiLogin', 'HomeController@apiLogin');//会员登陆

Route::get('/wechat/oauthAmi', 'WechatController@oauthAmi');//会员微信登陆
Route::get('/wechat/oauthCallbackAmi', 'WechatController@oauthCallbackAmi');//微信回调
Route::post('/wechat/bindUser', 'WechatController@bindUser');//微信绑定用户手机
Route::post('/wechat/wxjs', 'WechatController@wxjs');//微信绑定用户手机
Route::post('/wechat/sendSms', 'WechatController@sendSms');//绑定用户发短信

Route::get('activity/activityView', 'Activity\MainController@activityView')->name('activityView');
Route::post('activity/getWxPayJson', 'Activity\MainController@getWxPayJson')->name('getWxPayJson');
Route::post('activity/getWxPayUrl', 'Activity\MainController@getWxPayUrl')->name('getWxPayUrl');
Route::any('activity/payCallback', 'Activity\MainController@payCallback')->name('payCallback');
Route::any('activity/boundPhone', 'Activity\MainController@boundPhone')->name('boundPhone');
Route::any('activity/registerShareSeed', 'Activity\MainController@registerShareSeed')->name('registerShareSeed');
